<template>
    <div class="Walletbox">
        <div class="wallet-head border flex flex-align-center flex-pack-center">
            <div class="saixuanbox flex flex-align-center flex-pack-center">
               <p>时间</p>
               <img src="@/assets/img/sanjia.png" alt="">
            </div>
            <div class="saixuanbox flex flex-align-center flex-pack-center">
               <p>类型</p>
               <img src="@/assets/img/sanjia.png" alt="">
            </div>
        </div>
        <div style="height:1.24rem"></div>
        <div v-if='isListShow'>
             <NullTemp ></NullTemp>
         </div>
        <!-- 列表开始 -->
        <div class="bnh-list-item border flex flex-align-center" v-else='isListShow'>
                <p class="leixin flex-1">下级经销商收益提成</p>
                <div class="tipsBox">
                    <p>2018-03-13 12:30</p>
                    <p class="wallet-cont">+300</p>
                </div>
        </div><!-- 列表结束 -->
    </div>
</template>
<script>
import NullTemp from '../components/Null'
import http from '../utils/http'
import api from '../utils/api'
import utils from '../utils/utils'
export default {
    components:{
        NullTemp
    },
    created(){ //页面初始化时修改网页标题
            window.document.title = '收益记录';
            this.getBalanceList();
   },
   data(){
       return{
         BalanceList:[], //收益列表
         isListShow:false, //判断初次加载有无数据
       }
   },
  methods:{
    getBalanceList:async function(){ //获取收益列表
           let params = { id: localStorage.id}
           const res = await http.get(api.findIncomeDetail, params);
           	if (res.data.success) {
                if(res.data.bnhDealerIncomeDetailVO.length == 0){
                    this.isListShow = true;
                }else{
                  this.BalanceList;
                }
			 }else{
              this.$vux.toast.text(res.data.message, 'middle');
            }
      },
  }
}
</script>
<style scoped>
.wallet-head{height: 1.24rem;width: 100%;position: fixed;top: 0;left: 0;}
.saixuanbox{height: 1.24rem;width: 2.25rem;margin: 0 0.3rem}
.saixuanbox img{margin-left: 5px;height: 0.13rem;width: auto}
.bnh-list-item{height: 1.24rem;}
 .leixin{margin-left: 0.3rem;font-size: 0.32rem;color: #666666}
 .tipsBox{text-align: right;margin-right: 0.3rem;color: #999999}
 .tipsBox .wallet-cont{font-size: 0.36rem;line-height: 0.2rem;color: #f17421}
</style>


